package tables

import (
	"gorm.io/gorm"
)

var DbWriter *gorm.DB
var DbReader *gorm.DB

// 全局用户表db实例
var UserAccount *DbSvcUserAccount

var Trip *DbSvcTrip

var TripItem *DbSvcTripItem

var AccountConfig *DbSvcAccountConfig

// 全局角色表db实例

func InitDbInstance(DbWriter *gorm.DB, DbReader *gorm.DB) {
	// DbWriter = dbinit.GetDbInstance()
	// DbReader = dbinit.GetDbInstance()

	//初始化实例
	UserAccount = NewUserAccount(DbWriter, DbReader)
	Trip = NewTrip(DbWriter, DbReader)
	TripItem = NewTripItem(DbWriter, DbReader)
	AccountConfig = NewAccountConfig(DbWriter, DbReader)
}
